package com.wanxi.order.Controller;

import com.wanxi.order.entity.Result;
import com.wanxi.order.vo.RefuseOrderVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "商家订单接口")
@RequestMapping("/merchants/order")
public class MerchantsOrderController {
    @ApiOperation("用户详细订单接口")
    @PostMapping("/getOrder")
    public Result getOrder(@ApiParam("订单id") Integer orderId,
                           @ApiParam("用户id") Integer userId){
        Result result = new Result();
        result.setCode(1);
        return result;
    }
    @ApiOperation("订单发货接口")
    @PostMapping("/shipped")
    public Result shipped(@ApiParam("订单id") Integer orderId,
                           @ApiParam("用户id") Integer userId){
        Result result = new Result();
        result.setCode(1);
        return result;
    }
    @ApiOperation("拒绝订单")
    @PostMapping("/refuseOrder")
    public Result refuseOrder(@ApiParam("订单id") Integer orderId,
                          @ApiParam("用户id") Integer userId){
        Result result = new Result();
        RefuseOrderVo refuseOrderVo = new RefuseOrderVo();
        result.setData(refuseOrderVo);
        return result;
    }
    @ApiOperation("拒单说明")
    @PostMapping("/RejectionInstructions")
    public Result ReasonRejection(RefuseOrderVo refuseOrderVo){
        Result result = new Result();
        result.setCode(1);
        return result;
    }
    @ApiOperation("抢单接口")
    @PostMapping("/grabOrders")
    public Result GrabOrders(@ApiParam("订单id") Integer orderId,
                             @ApiParam("订单id") Integer userId,
                             @ApiParam("店铺id") Integer shopId){
        Result result = new Result();
        result.setCode(1);
        return result;
    }
}

